home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-19 / pkey12_1.zip / DL.LSP < prev    next >
Text File  |  1992-09-13  |  575b  |  20 lines

  1. ;Multiple delete layers based on selection (BE VERY VERY CAREFULL)
  2. ;Any mishaps can be undone. Merely type U at the command line and
  3. ;press return.
  4. ;
  5. ;
  6. (defun C:dl ()
  7. (princ "\nDelete Layers - Select one object on each layer to be deleted")
  8. (setq ss (ssget))
  9. (setq counter 0)
  10. (prompt "Deleting layers...")
  11. (while
  12.   (setq e (ssname ss counter))
  13.   (setq l (cdr (assoc 8 (entget e))))
  14.   (setq S (ssget "X" (list (cons 8 l))))
  15. (progn
  16.   (command "erase" s ""))
  17.   (setq counter (+ counter 1))
  18.   (princ l)(princ ", ") 
  19.   (princ)))
  20. (princ "\nType DL to execute.")